<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>后台管理中心</title>
    <link href="__STATIC__/admin/js/bootstrap/css/bootstrap.css"
          rel="stylesheet">
    <link href="__STATIC__/admin/css/AdminLTE.css" rel="stylesheet"
          type="text/css" />
    <!--[if lt IE 9]>
    <script src="__STATIC__/admin/js/html5shiv.min.js"></script>
    <script src="__STATIC__/admin/js/respond.min.js"></script>
    <![endif]-->
    <script src="__STATIC__/admin/js/jquery.min.js"></script>
    <script src="__STATIC__/admin/js/bootstrap/js/bootstrap.min.js"></script>
    <script src="__STATIC__/admin/js/common.js"></script>
    <script src="__STATIC__/admin/js/plugins.js"></script>
    <script src="__STATIC__/admin/js/layer/layer.js"></script>
</head>
<script>
    <!--停封-->
$(document).ready(function(){
    $(".fid").click(function () {
        var link = $(this);
        var fid = link.attr("data-id");
        var msg ='您确定要进行操作吗?';
        Plugins.confirm({title:'信息提示',content:msg,okText:'确定',cancelText:'取消',okFun:function(){
            Plugins.closeWindow();
            $.get("{:url('admin/user/userSet')}?id="+fid+"&code=1",function(data){
                console.log(data);
                if(data == 0){
                    layer.msg('改变成功', {icon: 6});
                    setTimeout(function(){window.location.reload();},2000);
                }else{
                    layer.msg('改变失败,请检查会员当前信息');
                    setTimeout(function(){window.location.reload();},2000);
                }
            });
        }});
    })
    })



</script>
<body class='wst-page'>
<table class="table table-hover">
    <tr>
        <td>ID</td>
        <td>会员名字</td>
        <td>会员状态</td>
        <td>会员级别</td>
        <td>操作</td>
    </tr>
    {volist name="row" id="vo"}
        <tr>
            <td>{$vo.user_id}</td>
            {if condition="$vo['user_grade'] eq 1"}
                <td style="color: red">{$vo.user_name}</td>
             {else/}
                <td>{$vo.user_name}</td>
            {/if}
            {if condition="$vo['user_state'] eq 0"}
            <td><span
                    class='label label-success wst-label'> 启用 </span></td>
            {else/}
            <td><span
                    class='label label-danger wst-label'> 停用 </span></td>
            {/if}
            {if condition="$vo['user_grade'] eq 0"}
                <td>普通用户</td>
            {elseif condition="$vo['user_grade'] eq 1"}
                <td>会员</td>
            {elseif condition="$vo['user_grade'] eq 2"}
                 <td>高级会员</td>
            {/if}
            <td>
                <a href="{:url('admin/examine/uservideo')}?id={$vo.user_id}">
                    <button  type="button" class="btn btn-info">他的视频</button>
                </a>
            </td>
        </tr>
    {/volist}
    <tr>
        <td>{$page}</td>
    </tr>
</table>
</body>
</html>